﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace jnagr.Web.info
{
    public partial class show : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                checkright.Titlename = getTitlename(6);
                if (null != Request.QueryString["id"])
                {
                    int id = 0;
                    int.TryParse(Request.QueryString["id"], out id);
                    if (id != 0)
                    {
                        BLL.info bll = new BLL.info();
                        Model.info model = bll.GetModel(id);
                        if (model != null)
                        {
                            lbltitle.Text = model.title;
                            string msg = "";
                            if (model.Alarmclass != null)
                                msg += model.Alarmclass.ToString()+" ";
                            if(model.Alevel!=null)
                                msg += model.Alevel.ToString() + " ";
                            lbltime.Text = msg+ model.infotime.Value.ToShortDateString();
                            lblcontent.Text = model.infocontent;
                        }
                    }
                }
            }

        }
    }
}